
import Vouter from 'vue-router';
import Vue from 'vue';
import homeChildren from './homeChildren';
const routes = [
   
    {
        path:'/home',
        name:'home',
        meta:{
            title:'首页'
        },
        component:()=>import('@/view/home'),
        children:homeChildren
    },
    {
        path:'/login',
        name:'login',
        meta:{
            title:'登录'
        },
        component:()=>import('@/view/login')
    },
    {
        path:'/404',
        component:()=>import('../view/404')
    },
    {
        path:'/',
        redirect:'/home'
    },
    {
        path:'*',
        redirect:'/404'
    }
]

Vue.use(Vouter);
const router = new Vouter({
    mode:'history',
    routes
})

export default router